﻿using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ListViewDemo.view
{
    /// <summary>
    /// PersonView.xaml 的交互逻辑
    /// </summary>
    public partial class PersonView : UserControl
    {
        public PersonView()
        {
            InitializeComponent();
        }
    }

    public partial class Person : ObservableObject
    {

        [ObservableProperty]
        public partial string Name { get; set; } = "none";

        [ObservableProperty]
        public partial int Age { get; set; } = 10;

        private bool V { get; set; } = true;
        [RelayCommand(CanExecute = nameof(V))]
        public void Foo()
        {
            Name = "hello cy";
        }
    }

}
